<!--
	作者：1550495493@qq.com
	时间：2019-08-13
	描述：新增用户
-->
<template>
	<div class="HomePage">
		<div class="location">
			<div class="location-text fl">
				<img class="location-img fl" src="../../images/home/i.png" />
				<p class="fr" v-if="!id">新增用户</p>
				<p class="fr" v-if="id">编辑用户</p>
				<!--<p class="fr">编辑用户</p>-->
			</div>
			<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
		</div>
		<div class="IssuedNotice-box add-issuedNotice-box">
			<form class="form-box" id="userForm">
				<div class="form-line input-required">
					<label>姓名：</label>
					<div class="input-box">
						<input type="text" name="expertName" v-model="user.expert_name" placeholder="请输入用户名">
					</div>
				</div>
				<!--			<div class="form-line ">
					<label>所在单位：</label>
					<div class="input-box">
						<input type="text" name="expertUnit" v-model="user.expert_unit" placeholder="请输入所在单位">
					</div>
				</div>

				<div class="form-line ">
					<label>导师类别：</label>
					<div class="input-box">
						<input type="text" name="tutorClasses" v-model="user.tutor_classes" placeholder="请输入导师类别">
					</div>
				</div>
				<div class="form-line">
					<label>一级学科：</label>
					<div class="input-box">
						<input type="text" name="firestLevel" v-model="user.firest_level" placeholder="请输入一级学科">
					</div>
				</div>
				<div class="form-line ">
					<label>二级学科：</label>
					<div class="input-box">
						<input type="text" name="secondLevel" v-model="user.second_level" placeholder="请输入二级学科">
					</div>
				</div>
				<div class="form-line ">
					<label>党内职务：</label>
					<div class="input-box">
						<input type="text" name="partyPolicyDuty" v-model="user.party_policy_duty" placeholder="请输入党内职务">
					</div>
				</div>
				<div class="form-line ">
					<label>专业技术职务：</label>
					<div class="input-box">
						<select name="professionalSkillDuty" v-model="professional_skill_duty">
              <option value="">请选择</option>
							<option value="教授">教授</option>
              <option value="副教授">副教授</option>
              <option value="研究员">研究员</option>
              <option value="副研究员">副研究员</option>
         &lt;!&ndash;     <option v-for="role in roleSelect" :selected="user.roleId == role.id ? true : false" v-model="role.id">{{role.roleName}}</option>&ndash;&gt;
						</select>
					</div>
				</div>
				<div class="form-line ">
					<label>专业技术职务级别：</label>
					<div class="input-box">
						<select name="professionalSkillDutyLevel" v-model="professional_skill_duty_level">
              <option value="">请选择</option>
              <option value="正高级">正高级</option>
              <option value="副高级">副高级</option>
						</select>
					</div>
				</div>

        <div class="form-line ">
          <label>职务：</label>
          <div class="input-box">
            <input type="tel" name="position" v-model="user.position"  placeholder="职务">
          </div>
        </div>-->

				<div class="form-line input-required">
					<label>手机号码：</label>
					<div class="input-box">
						<input type="tel" name="phoneNumber" v-model="user.user_phone_number" placeholder="请输入联系电话">
					</div>
				</div>
				<div class="form-line input-required">
					<label>邮箱：</label>
					<div class="input-box">
						<input type="text" name="email" v-model="user.email" placeholder="请输入邮箱">
					</div>
				</div>
				<div class="form-line input-required">
					<label>性别：</label>
					<div class="input-box checkbox">
						<label><input type="radio" v-model="expertGender" value="男" name="expertGender" ><i>✓</i>男</label>
						<label><input type="radio" v-model="expertGender" value="女" name="expertGender" ><i>✓</i>女</label>
					</div>
				</div>
				<div class="form-line input-required">
					<label>身份证：</label>
					<div class="input-box">
						<input type="text" name="userAccount" v-model="user.user_account" placeholder="请输入登录账号">
					</div>
				</div>
				<div class="form-line input-required">
					<label>登录密码：</label>
					<div class="input-box">
						<input type="password" name="userPassword" v-model="user.user_password" placeholder="请输入登录密码">
					</div>
				</div>
				<div class="form-line input-required">
					<label>用户角色：</label>
					<div class="input-box">
						<select name="roleId" id="roleName">
							<option value="">请选择</option>
              <option v-for="role in roleSelect" :selected="user.roleid == role.id ? true : false" :value="role.id">{{role.roleName}}</option>
						</select>
					</div>
				</div>
				<div style="text-align: center;">
					<input class="save" @click="subUser" type="button" value="确定" />
					<router-link to='/userList'>
						<input class="cancel" type="button" value="取消" />
					</router-link>
				</div>
				
			</form>
		</div>

	</div>
</template>
<script src="./addUser.js"></script>

<style scoped>
	@import "addUser.css";
</style>
